﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ABMyF.Models;
namespace ABMyF.Controllers
{
    public class HomeController : Controller
    {

        public ActionResult Index()
        {
            var listaDeAlumnos = AlumnoContenedor.alumnos;
            return View(model: listaDeAlumnos);
        }

        [HttpGet]
        public ActionResult Agregar()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Agregar(Alumno alumnos)
        {
            AlumnoContenedor.agregarAlumno(alumnos);
            return RedirectToAction("Index");
        }


    }
}
